feat: Add support for custom HTTP and HTTPS ports via environment variables (#40)#56
Open
vanmarkic wants to merge 3 commits intojacksteamdev:mainfrom
Conversation
…iables (jacksteamdev#40) Add OBSIDIAN_HTTP_PORT and OBSIDIAN_HTTPS_PORT environment variables to allow users to configure custom ports for the MCP server. This provides: - Port conflict resolution for environments where default ports are in use - Environmental flexibility for restrictive network configurations - Enhanced security through non-standard port usage The implementation maintains backward compatibility by defaulting to the original ports (27123 for HTTP, 27124 for HTTPS) when environment variables are not set. Updated documentation in packages/mcp-server/README.md to include configuration examples and descriptions of all available environment variables. Fixes jacksteamdev#40
- Test BASE_URL construction - Test protocol selection based on OBSIDIAN_USE_HTTP - Test host configuration - Test port selection for HTTP/HTTPS - Document expected behavior for custom ports - Verify default port values (27123 for HTTP, 27124 for HTTPS)
✅ Deploy Preview for superb-starlight-b5acb5 canceled.
|
✅ Deploy Preview for superb-starlight-b5acb5 canceled.
|
- Add comprehensive environment variable testing - Test buildBaseUrl logic with different configurations - Cover real-world scenarios (WSL, Docker, reverse proxy, multi-vault) - Validate port number edge cases - Test environment variable priority - Add 40+ test cases for thorough coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
OBSIDIAN_HTTP_PORTandOBSIDIAN_HTTPS_PORTenvironment variablesRelated Issue
Addresses feature request #40
🤖 Generated with Claude Code